<?php
// unneeded session_start();

class Common_models extends CI_Model{
    
    
    function __construct()
    {
        parent::__construct();
    }
    
    
    public function get_active_user_ids() {
        
        $query = $this->doctrine->em->createQuery("select u.id from ORM\Dynasties2\Users u WHERE u.isActive = '1'");
        
        return $query->getResult();
        
    } ////////// end function get_active_user_ids
    
    public function get_active_family_ids() {

        $query = $this->doctrine->em->createQuery("select u.id from ORM\Dynasties2\Families u WHERE u.isActive = '1' OR u.isActive IS NULL");

        return $query->getResult();
        
    } ////////// end function get_active_family_ids
    
    public function get_active_family_information() {

        $query = $this->doctrine->em->createQuery("select u from ORM\Dynasties2\Families u WHERE u.isActive = '1' OR u.isActive IS NULL");

        return $query->getResult();
        
    } ////////// end function get_active_family_information
    
    
    
    
}